package com.tyqx.hashchainbackend.controller;

import com.tyqx.hashchainbackend.service.QueryDonateService;
import com.tyqx.hashchainbean.module.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@RestController
@RequestMapping("/queryDonate")
public class QueryDonateController {

    @Resource
    private QueryDonateService queryDonateService;


    //获取捐赠物资信息
    public List<DonateProduct> getDonateProductById(String donateId, String userName) {
        return queryDonateService.getDonateProductById(donateId, userName);
    }

    //获取捐赠物资信息
    public List<DonateProduct> getDonateProductByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getDonateProductByTime(startTime, endTime, userName);
    }

    //获取捐款信息
    public List<DonateCash> getDonateCashById(String donateId, String userName) {
        return queryDonateService.getDonateCashById(donateId, userName);
    }

    //获取捐款信息
    public List<DonateCash> getDonateCashByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getDonateCashByTime(startTime, endTime, userName);
    }

    //获取捐赠物资入库信息
    public List<ProductIn> getProductInById(String donateId, String userName) {
        return queryDonateService.getProductInById(donateId, userName);
    }

    //获取捐赠物资入库信息
    public List<ProductIn> getProductInByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getProductInByTime(startTime, endTime, userName);
    }

    //获取捐赠物资出库信息
    public List<ProductOut> getProductOutById(String donateId, String userName) {
        return queryDonateService.getProductOutById(donateId, userName);
    }

    //获取捐赠物资出库信息
    public List<ProductOut> getProductOutByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getProductOutByTime(startTime, endTime, userName);
    }

    //获取领用物资信息
    public List<UseProduct> getUseProductById(String donateId, String userName) {
        return queryDonateService.getUseProductById(donateId,userName);
    }

    //获取领用物资信息
    public List<UseProduct> getUseProductByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getUseProductByTime(startTime, endTime, userName);
    }

    //获取需求物资信息
    public List<NeedProduct> getNeedProductById(String donateId, String userName) {
        return queryDonateService.getNeedProductById(donateId, userName);
    }

    //获取需求物资信息
    public List<NeedProduct> getNeedProductByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getNeedProductByTime(startTime, endTime, userName);
    }

    //获取采购物资信息
    public List<BuyProduct> getBuyProductById(String donateId, String userName) {
        return queryDonateService.getBuyProductById(donateId, userName);
    }

    //获取采购物资信息
    public List<BuyProduct> getBuyProductByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getBuyProductByTime(startTime, endTime, userName);
    }

    //获取生产计划信息
    public List<ProducePlan> getProducePlanById(String donateId, String userName) {
        return queryDonateService.getProducePlanById(donateId,userName);
    }

    //获取生产计划信息
    public List<ProducePlan> getProducePlanByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getProducePlanByTime(startTime, endTime, userName);
    }

    //获取产成品入库信息
    public List<ProduceProductIn> getProduceProductInById(String donateId, String userName) {
        return queryDonateService.getProduceProductInById(donateId, userName);
    }

    //获取产成品入库信息
    public List<ProduceProductIn> getProduceProductInByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getProduceProductInByTime(startTime, endTime, userName);
    }

    //获取销售出库信息
    public List<ProduceProductOut> getProduceProductOutById(String donateId, String userName) {
        return queryDonateService.getProduceProductOutById(donateId, userName);
    }

    //获取销售出库信息
    public List<ProduceProductOut> getProduceProductOutByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getProduceProductOutByTime(startTime, endTime, userName);
    }

    //获取运送物资出库信息
    public List<ShippingInfo> getShippingProductById(String donateId, String userName) {
        return queryDonateService.getShippingProductById(donateId, userName);
    }

    //获取运送物资出库信息
    public List<ShippingInfo> getShippingProductByTime(Date startTime, Date endTime, String userName) {
        return queryDonateService.getShippingProductByTime(startTime, endTime, userName);
    }
}
